[% IF (cookie = cgi.cookie('SessionID')) %]



   <h1>Got Cookie</h1>



   <p>

     Your SessionID is [% cookie %].

   </p>



[% ELSE %]

   [% cookie = cgi.cookie( 

         name    = 'SessionID',

         value   = 12345678,

         expires = '+1m' 

      );

      cookies.push(cookie) 

   %]



   <h1>Set Cookie</h1>



   <p>

     Cookie has been set.  Please reload page.

   </p>



[% END %]
